<?php
include("../conn.php");
// 分页
if($_REQUEST['page']!="" && $_REQUEST['pagesize']!=""){
	$de=$_REQUEST['page']*$_REQUEST['pagesize'];
	$size=$_REQUEST['pagesize'];
}else{
	$de=0;
	$size=10;
}
// 分页 end
$query = mysql_query("select * from remen_shichang order by sort limit $de,$size");
$remen_shichang = array();
$i=0;
while ($row = mysql_fetch_assoc($query)) {
	$remen_shichang[$i][id] = $row[id];
	$remen_shichang[$i][name] = $row[name];
	$remen_shichang[$i][images] = $row[images];
	$remen_shichang[$i][cityid] = $row[cityid];
	$i++;
}
$arr = array('code' => 200, 'msg' =>'查询热门市场信息成功', 'remen_shichang' => $remen_shichang);
echo json_encode($arr);